{extend name="base" /}
{block name="css"}
<link rel="stylesheet" href="__JS__/jeDate/skin/jedate.css">
{/block}
{block name="body"}
<div class="layui-body">
    <!--tab标签-->
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class=""><a href="{:url('admin/score/index')}"> 成绩管理</a></li>
            <li class=""><a href="{:url('admin/score/add')}"> 添加管理</a></li>
            <li class="layui-this">编辑成绩</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <form class="layui-form form-container" action="{:url('admin/score/edit')}" method="post">
                    <div class="layui-form-item">
                        <label class="layui-form-label">姓名</label>
                        <div class="layui-input-block">
                            <input type="text" name="name" value="{$score.name}" required  lay-verify="required" placeholder="请输入姓名"
                                  maxlength="30" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">分数</label>
                        <div class="layui-input-block">
                            <input type="text" name="score" value="{$score.score}" required  lay-verify="required" placeholder="请输入分数"
                                   oninput="this.value = this.value.replace(/[^\d.]/g, '')"  maxlength="5" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">考试</label>
                        <div class="layui-input-block">
                            <select name="exam_id">
                                <option value="0">请选择</option>
                                {foreach name="exam_list" item="vo"}
                                {if condition="($vo.id == $score.exam_id)"}
                                <option value="{$vo.id}" selected>{$vo.exam_name}</option>
                                {else/}
                                <option value="{$vo.id}">{$vo.exam_name}</option>
                                {/if}
                                {/foreach}
                            </select>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">班级</label>
                        <div class="layui-input-block">
                            <select name="class_id">
                                <option value="0">请选择</option>
                                {foreach name="class_list" item="vo"}
                                {if condition="($vo.id == $score.class_id)"}
                                <option value="{$vo.id}" selected>{$vo.class_name}</option>
                                {else/}
                                <option value="{$vo.id}">{$vo.class_name}</option>
                                {/if}
                                {/foreach}
                            </select>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">备注</label>
                        <div class="layui-input-block">
                            <textarea name="remark" placeholder="（选填）请输入备注" maxlength="200" class="layui-textarea">{$score.remark}</textarea>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <input type="hidden" name="id" value="{$score.id}">
                            <button class="layui-btn" lay-submit lay-filter="*">保存</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        </div>
                    </div>

                </form>
            </div>
        </div>
    </div>
</div>
{/block}
{block name="js"}
<script src="__JS__/jeDate/dist/jedate.min.js"></script>
{/block}
{block name="script"}
<script>
</script>
{/block}
